package com.netflexitysolutions.amazonws.sdb.orm.internal.util;


public final class QueryUtils {
	
	public static final String ITEMNAME = "itemName()";
	public static final String SELECT = "SELECT ";
    public static final String FROM = " FROM ";
    public static final String SELECT_ALL_FROM = "SELECT " + StringConstants.STAR + FROM;
    public static final String SELECT_COUNT_ALL_FROM = "SELECT count" + StringConstants.LP + StringConstants.STAR + StringConstants.RP + FROM;
	public static final String AND = " AND ";
    public static final String OR = " OR ";
    public static final String WHERE = " WHERE ";
    public static final String LIKE = " LIKE ";
    public static final String IN = " IN ";
    public static final String DESC = " DESC";
    public static final String ORDER_BY = " ORDER BY ";
    public static final String NULL = "NULL";
    public static final String DOUBLE_SINGLE_QUOTE = "''";
    
    /**
     * @param str
     * @return
     */
    public static String escapeQuotes(String value){
        if (value == null) {
           return null;
       }
       String s = value;
       s = s.replace("\\", "\\\\");
       s = s.replace("'", "''");
       s = s.replace("\"", "\"\"");
       return s;
   }
}
